package com.hjl.config;

import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;

/**
 * @author ServivE
 * @version 0.1
 * @className MyWebAppInitializer
 * @description
 * @date 2024/8/13 21:50
 * @since jdk17
 */
public class MyWebAppInitializer extends AbstractAnnotationConfigDispatcherServletInitializer {

    //指定root容器对应的配置类
    @Override
    protected Class<?>[] getRootConfigClasses() {
        return new Class<?>[] {MapperJavaConfigNew.class, ServiceJavaConfig.class, DataSourceJavaConfig.class };
    }

    //指定web容器对应的配置类
    @Override
    protected Class<?>[] getServletConfigClasses() {
        return new Class<?>[] { WebJavaConfig.class };
    }

    //指定dispatcherServlet处理路径，通常为 /
    @Override
    protected String[] getServletMappings() {
        return new String[] { "/" };
    }
}